#include <iostream>
#include <vector>

using namespace std;

int rob(vector<int>& nums) {
    if (nums.size() == 1)
        return nums[0];

    int dp[410] = { 0  , nums[0] };
    int ret = INT_MIN;

    for (int i = 2; i <= nums.size(); ++i)
    {
        dp[i] = max(dp[i - 1], dp[i - 2] + nums[i - 1]);
        ret = max(ret, dp[i]);
    }

    return ret;
}

int main()
{

	return 0;
}